package com.mate.cloud.enums;

/**
 * CommonEnum 接口
 *
 * @author cong zhi
 * @email 448341911@qq.com
 * @createDate 2023/3/3 10:27
 * @version: v1.0
 */
public interface CommonEnum extends CodeBaseEnum, SelfDescribedEnum {
    /**
     * 枚举值匹配
     *
     * @param value
     * @return
     */
    default boolean match(String value) {
        if (value == null) {
            return false;
        }
        return value.equals(String.valueOf(getCode()))
                || value.equals(getName());
    }
}
